package com.redoop.main;

import com.redoop.common.LogHelper;
import com.redoop.common.common;
import com.redoop.thread.MainThead;

public class CreateDataXJson {
	
	/*
	 * 启动方法参数
	 * -Dconf   ----- 配置文件路径
	 */
	public static void main(String[] args) {
		System.out.println( common.g_moudle_name + " start..." );

		MainThead main_thread = new MainThead();
		// 读取配置文件
		String strConfFile = System.getProperty("conf","");
		if( strConfFile.isEmpty() ) {
			String absolute = Thread.currentThread().getContextClassLoader().getResource("").getPath();
			strConfFile = absolute + common.default_conf_file;
		}
		
		if( !MainProc.gIniFile.readConfigFile(strConfFile)) {
			System.out.println("config file = " + strConfFile);
			return;
		}
		
		// 启动主线程
		main_thread.init();
		main_thread.start();
		LogHelper.info("主线程正常启动...");
	}
}
